﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GatherWebLib
{
   public class cGlobalParas
    {

        /// <summary>
        /// 任务状态
        /// </summary>
        public enum TaskState
        {
            UnStart = 1010,
            Started = 1011,
            Aborted = 1012,
            Waiting = 1013,
            Running = 1014,
            Pause = 1015,
            Stopped = 1016,
            Exporting = 1017,
            Completed = 1018,
            Failed = 1019,
            Publishing = 1020,
        }

        /// <summary>
        /// 当前网页地址采集状态
        /// </summary>
        public enum UrlGatherResult
        {
            UnGather = 2031,
            Succeed = 2032,
            Error = 2033,
            Gathered = 2034,
        }
        /// <summary>
        /// 编码
        /// </summary>
        public enum WebCode
        {
            auto = 1000,
            gb2312 = 1001,
            utf8 = 1002,
            gbk = 1003,
            big5 = 1004,
            NoCoding = 1005,
        }

        /// <summary>
        /// 抓取页面类型
        /// </summary>
        public enum GDataType
        {
            Txt = 1091,
            Picture = 1092,
            Flash = 1093,
            File = 1094,
        }
        /// <summary>
        /// 匹配规则
        /// </summary>
        public enum LimitSign
        {
            NoLimit = 2001,          //不做任意格式的限制
            NoWebSign = 2002,        //匹配时去掉网页符号
            OnlyCN = 2003,           //只匹配中文
            OnlyDoubleByte = 2004,     //只匹配双字节字符
            OnlyNumber = 2005,         //只匹配数字
            OnlyChar = 2006,           //只匹配字母数字及常用字符
            Custom = 2007,           //自定义正则匹配表达式 
        }
        public enum TaskType
        {
            HtmlByUrl = 1051,
            RssByUrl = 1052,
            HtmlByWeb = 1053,
            AjaxHtmlByUrl = 1054,
        }
       /// <summary>
       /// 下载结果
       /// </summary>
        public enum DownloadResult
        {
            Succeed = 1081,
            Failed = 1082,
            Err = 1083,
        }
        /// <summary>
        /// 输出规则类型
        /// </summary>
        public enum ExportLimit
        {
            ExportNoLimit = 2040,      //不做输出控制
            ExportNoWebSign = 2041,    //输出时去掉网页符号
            ExportPrefix = 2042,       //输出时附加前缀  
            ExportSuffix = 2043,       //输出时附加后缀
            ExportTrimLeft = 2044,     //左起去掉字符
            ExportTrimRight = 2045,    //右起去掉字符
            ExportReplace = 2046,      //替换其中符合条件的字符
            ExportTrim = 2047,         //去掉字符串首尾空格
            ExportRegexReplace = 2048, //输出时采用正则表达式进行替换


        }
       /// <summary>
       /// 日志类型
       /// </summary>
        public enum LogType
        {
            /// <summary>
            /// 详情
            /// </summary>
            Info = 2061,
            /// <summary>
            /// 错误
            /// </summary>
            Error = 2062,
            /// <summary>
            /// 警告
            /// </summary>
            Warning = 2063,
            RunPlanTask = 2064,
            /// <summary>
            /// 抓取错误
            /// </summary>
            GatherError = 2065,
            /// <summary>
            /// 发布错误
            /// </summary>
            PublishError = 2066,
        }
    }
}
